<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	request.setAttribute("path", request.getContextPath());
%>
<script type="text/javascript">
$(function(){
	common.ajaxQuery("${root}/mst/pro/part/list");
});

function deleteById( id ){
	if(confirm("确定删除此配件!")){
		var url = "${root}/mst/pro/part/delete/" + id;
		common.ajaxSubmit( url ,"","删除产品失败,请重试!","",'common.ajaxQuery("${root}/mst/pro/part/list")');
	}
}

</script>
<form class="form-horizontal" id="queryForm" role="form">
	<input name="orderName" value="name" type="hidden">
	<table class="table table-hover">
		<tr>
			<th>配件编号:</th>
			<td><input type="text" class="input-xlarge" name="id"/></td>
			<th>配件名称:</th>
			<td><input type="text" class="input-xlarge" name="name"/></td>
			<th>配件级别:</th>
			<td>
				<select id="level" name="level" class="input-xlarge" >
					<option value="-1"></option>
				    <c:forEach var="item" items="${partLevels}">
						<option value="${item.id }"><c:out value="${item.name }"/></option>
					</c:forEach>
				</select>
			</td>
		</tr>
		<tr>
			<th>生产类型:</th>
			<td>
				<select id="makeType" name="makeType" class="input-xlarge" >
					<option value="-1"></option>
				    <c:forEach var="item" items="${makeTypes}">
						<option value="${item.id }"><c:out value="${item.name }"/></option>
					</c:forEach>
				</select>
			</td>
			<th>是否回收:</th>
			<td colspan="3">
				<select id="isBack" name="isBack" class="input-xlarge" >
					<option value=""></option>
					<option value="1">是</option>
					<option value="0">否</option>
				</select>
			</td>
		</tr>
		<tr>
			<th>修改日期:</th>
			<td colspan="2" class="controls">
                  	<input type="text" data-date="${today}"  data-date-format="yyyy-mm-dd" class="input-medium datepicker" id="startDate" name="startDate" >
                  	&nbsp;&nbsp;~&nbsp;&nbsp;
                  	<input type="text" data-date="${today}"  data-date-format="yyyy-mm-dd" class="input-medium datepicker" id="endDate" name="endDate" >
			</td>
			<td colspan="3">&nbsp;
			</td>
		</tr>
		
	</table>
	 <div class="form-actions text-center">
		      <button type="button" class="btn btn-success" onclick="common.ajaxQuery('${root}/mst/pro/part/list')">查询</button>
		      <a  class="btn btn-success" href="${root}/mst/pro/part/update/init?h=h03&n=n05" target="_blank">新增</a>
		    </div>
	 </div>
</form>
<div class="table-responsive">
<table class="table table-striped table-bordered">
	<thead>
		<tr >
			<th class="span1 text-center">编号</th>
			<th class="text-center">名称</th>
			<th class="span1 text-center">级别</th>
			<th class="span1 text-center">生产类型</th>
			<th class="span1 text-center">网点价格</th>
			<th class="span1 text-center">用户价格</th>
			<th class="span1 text-center">保修(月)</th>
			<th class="span1 text-center">是否回收</th>
			<th class="span1 text-center">更新时间</th>
			<th class="span3 text-center">操作</th>
		</tr>
	</thead>
	<tbody id="dataList">
	</tbody>
</table>
</div>

